package com.quick.controller;

import com.quick.domain.Book;
import com.quick.service.BookService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName TestController
 * @Description TODO
 * @Author wangxin43
 * @Date 2018/7/3 下午2:40
 * @Version 1.0
 **/
@RestController
@RequestMapping("/test")
public class TestController {
    @Resource
    private BookService bookService;

    @RequestMapping("/test")
    public String test(){
        Book book = new Book();
        book.setAuthor("wang");
        book.setBookName("boot");
        book.setIsbn("1122");
        bookService.save(book);
        return "success";
    }
}
